home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_061 / microemacs / edef.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  9KB  |  188 lines

  1. /*    EDEF:        Global variable definitions for
  2.             MicroEMACS 3.2
  3.  
  4.             written by Dave G. Conroy
  5.             modified by Steve Wilhite, George Jones
  6.             greatly modified by Daniel Lawrence
  7. */
  8.  
  9. /* some global fuction declarations */
  10.  
  11. char *malloc();
  12. char *strcpy();
  13. char *strcat();
  14. char *strncpy();
  15. char *itoa();
  16. char *getval();
  17. char *gtenv();
  18. char *gtusr();
  19. char *gtfun();
  20. char *token();
  21. char *ltos();
  22. char *flook();
  23.  
  24. #ifdef    maindef
  25.  
  26. /* for MAIN.C */
  27.  
  28. /* initialized global definitions */
  29.  
  30. int     fillcol = 72;                   /* Current fill column          */
  31. short   kbdm[NKBDM];            /* Macro                        */
  32. char    pat[NPAT];                      /* Search pattern        */
  33. char    rpat[NPAT];            /* replacement pattern        */
  34. char    *execstr = NULL;        /* pointer to string to execute    */
  35. char    golabel[NPAT] = "";        /* current line to go to    */
  36. int    execlevel = 0;            /* execution IF level        */
  37. int    eolexist = TRUE;        /* does clear to EOL exist    */
  38. int    revexist = FALSE;        /* does reverse video exist?    */
  39. int    flickcode = FALSE;        /* do flicker supression?    */
  40. char    *modename[] = {            /* name of modes        */
  41.     "WRAP", "CMODE", "SPELL", "EXACT", "VIEW", "OVER", "MAGIC", "CRYPT"};
  42. char    modecode[] = "WCSEVOMY";    /* letters to represent modes    */
  43. int    gmode = 0;            /* global editor mode        */
  44. int    gfcolor = 7;            /* global forgrnd color (white)    */
  45. int    gbcolor    = 0;            /* global backgrnd color (black)*/
  46. int     sgarbf  = TRUE;                 /* TRUE if screen is garbage    */
  47. int     mpresf  = FALSE;                /* TRUE if message in last line */
  48. int    clexec    = FALSE;        /* command line execution flag    */
  49. int    mstore    = FALSE;        /* storing text to macro flag    */
  50. struct    BUFFER *bstore = NULL;        /* buffer to store macro text to*/
  51. int     vtrow   = 0;                    /* Row location of SW cursor */
  52. int     vtcol   = 0;                    /* Column location of SW cursor */
  53. int     ttrow   = HUGE;                 /* Row location of HW cursor */
  54. int     ttcol   = HUGE;                 /* Column location of HW cursor */
  55. int    lbound    = 0;            /* leftmost column of current line
  56.                        being displayed */
  57. int    taboff    = 0;            /* tab offset for display    */
  58. int    metac = CTRL | '[';        /* current meta character */
  59. int    ctlxc = CTRL | 'X';        /* current control X prefix char */
  60. int    reptc = CTRL | 'U';        /* current universal repeat char */
  61. int    abortc = CTRL | 'G';        /* current abort command char    */
  62.  
  63. int    quotec = 0x11;            /* quote char during mlreply() */
  64. char    *cname[] = {            /* names of colors        */
  65.     "BLACK", "RED", "GREEN", "YELLOW", "BLUE",
  66.     "MAGENTA", "CYAN", "WHITE"};
  67. KILL *kbufp  = NULL;        /* current kill buffer chunk pointer    */
  68. KILL *kbufh  = NULL;        /* kill buffer header pointer        */
  69. int kused = KBLOCK;        /* # of bytes used in kill buffer    */
  70. WINDOW *swindow = NULL;        /* saved window pointer            */
  71. int cryptflag = FALSE;        /* currently encrypting?        */
  72. short    *kbdptr;        /* current position in keyboard buf */
  73. short    *kbdend = &kbdm[0];    /* ptr to end of the keyboard */
  74. int    kbdmode = STOP;        /* current keyboard macro mode    */
  75. int    kbdrep = 0;        /* number of repetitions    */
  76. int    restflag = FALSE;    /* restricted use?        */
  77. long    envram = 0l;    /* # of bytes current in use by malloc */
  78. int    macbug = FALSE;        /* macro debuging flag        */
  79. char    errorm[] = "ERROR";    /* error literal        */
  80. char    truem[] = "TRUE";    /* true literal            */
  81. char    falsem[] = "FALSE";    /* false litereal        */
  82. int    cmdstatus = TRUE;    /* last command status        */
  83.  
  84. /* uninitialized global definitions */
  85.  
  86. int     currow;                 /* Cursor row                   */
  87. int     curcol;                 /* Cursor column                */
  88. int     thisflag;               /* Flags, this command          */
  89. int     lastflag;               /* Flags, last command          */
  90. int     curgoal;                /* Goal for C-P, C-N            */
  91. WINDOW  *curwp;                 /* Current window               */
  92. BUFFER  *curbp;                 /* Current buffer               */
  93. WINDOW  *wheadp;                /* Head of list of windows      */
  94. BUFFER  *bheadp;                /* Head of list of buffers      */
  95. BUFFER  *blistp;                /* Buffer for C-X C-B           */
  96.  
  97. BUFFER  *bfind();               /* Lookup a buffer by name      */
  98. WINDOW  *wpopup();              /* Pop up window creation       */
  99. LINE    *lalloc();              /* Allocate a line              */
  100. char    sres[NBUFN];        /* current screen resolution    */
  101.  
  102. #else
  103.  
  104. /* for all the other .C files */
  105.  
  106. /* initialized global external declarations */
  107.  
  108. extern  int     fillcol;                /* Fill column                  */
  109. extern  short   kbdm[];                 /* Holds kayboard macro data    */
  110. extern  char    pat[];                  /* Search pattern               */
  111. extern    char    rpat[];            /* Replacement pattern        */
  112. extern    char    *execstr;        /* pointer to string to execute    */
  113. extern    char    golabel[];        /* current line to go to    */
  114. extern    int    execlevel;        /* execution IF level        */
  115. extern    int    eolexist;        /* does clear to EOL exist?    */
  116. extern    int    revexist;        /* does reverse video exist?    */
  117. extern    int    flickcode;        /* do flicker supression?    */
  118. extern    char *modename[];        /* text names of modes        */
  119. extern    char    modecode[];        /* letters to represent modes    */
  120. extern    KEYTAB keytab[];        /* key bind to functions table    */
  121. extern    NBIND names[];            /* name to function table    */
  122. extern    int    gmode;            /* global editor mode        */
  123. extern    int    gfcolor;        /* global forgrnd color (white)    */
  124. extern    int    gbcolor;        /* global backgrnd color (black)*/
  125. extern  int     sgarbf;                 /* State of screen unknown      */
  126. extern  int     mpresf;                 /* Stuff in message line        */
  127. extern    int    clexec;            /* command line execution flag    */
  128. extern    int    mstore;            /* storing text to macro flag    */
  129. extern    struct    BUFFER *bstore;        /* buffer to store macro text to*/
  130. extern    int     vtrow;                  /* Row location of SW cursor */
  131. extern    int     vtcol;                  /* Column location of SW cursor */
  132. extern    int     ttrow;                  /* Row location of HW cursor */
  133. extern    int     ttcol;                  /* Column location of HW cursor */
  134. extern    int    lbound;            /* leftmost column of current line
  135.                        being displayed */
  136. extern    int    taboff;            /* tab offset for display    */
  137. extern    int    metac;            /* current meta character */
  138. extern    int    ctlxc;            /* current control X prefix char */
  139. extern    int    reptc;            /* current universal repeat char */
  140. extern    int    abortc;            /* current abort command char    */
  141.  
  142. extern    int    quotec;            /* quote char during mlreply() */
  143. extern    char    *cname[];        /* names of colors        */
  144. extern KILL *kbufp;            /* current kill buffer chunk pointer */
  145. extern KILL *kbufh;            /* kill buffer header pointer    */
  146. extern int kused;            /* # of bytes used in KB        */
  147. extern WINDOW *swindow;            /* saved window pointer        */
  148. extern int cryptflag;            /* currently encrypting?    */
  149. extern    short    *kbdptr;        /* current position in keyboard buf */
  150. extern    short    *kbdend;        /* ptr to end of the keyboard */
  151. extern    int kbdmode;            /* current keyboard macro mode    */
  152. extern    int kbdrep;            /* number of repetitions    */
  153. extern    int restflag;            /* restricted use?        */
  154. extern    long envram;        /* # of bytes current in use by malloc */
  155. extern    int    macbug;            /* macro debuging flag        */
  156. extern    char    errorm[];        /* error literal        */
  157. extern    char    truem[];        /* true literal            */
  158. extern    char    falsem[];        /* false litereal        */
  159. extern    int    cmdstatus;        /* last command status        */
  160.  
  161. /* uninitialized global external declarations */
  162.  
  163. extern  int     currow;                 /* Cursor row                   */
  164. extern  int     curcol;                 /* Cursor column                */
  165. extern  int     thisflag;               /* Flags, this command          */
  166. extern  int     lastflag;               /* Flags, last command          */
  167. extern  int     curgoal;                /* Goal for C-P, C-N            */
  168. extern  WINDOW  *curwp;                 /* Current window               */
  169. extern  BUFFER  *curbp;                 /* Current buffer               */
  170. extern  WINDOW  *wheadp;                /* Head of list of windows      */
  171. extern  BUFFER  *bheadp;                /* Head of list of buffers      */
  172. extern  BUFFER  *blistp;                /* Buffer for C-X C-B           */
  173.  
  174. extern  BUFFER  *bfind();               /* Lookup a buffer by name      */
  175. extern  WINDOW  *wpopup();              /* Pop up window creation       */
  176. extern  LINE    *lalloc();              /* Allocate a line              */
  177. extern    char    sres[NBUFN];        /* current screen resolution    */
  178.  
  179. #endif
  180.  
  181. /* terminal table defined only in TERM.C */
  182.  
  183. #ifndef    termdef
  184. extern  TERM    term;                   /* Terminal information.        */
  185. #endif
  186.  
  187.  
  188.